<?php
/**
 * 权限值模型
 * panglishan
 * 2020.07.26
 */
namespace App\Models\MainDB;

use Illuminate\Database\Eloquent\Model;

class AdminPermission extends Model{

    protected $table = 'ln_admin_permission';

    protected $primaryKey = 'permission_id';

    protected $fillable = [
        'permission_id',      //权限编号
        'permission_name',    //权限名称
        'permission_key',     //权限key值,接口路由
        'add_time',     //添加时间
        'menu_id',       //所属菜单的ID
        'method',
    ];

    public $timestamps = false;

    //关联admin模型
    public function menu()
    {
        return $this->hasOne('App\Models\MainDB\AdminMenu', 'menu_id', 'menu_id');
    }


}